TrollCAT CTF 2021

Change my mind

使用 Stegsolve 解隐写可以发现 flag。

Trollcat{I_L0v3_Tr011C4t}

Forbidden

附件给出了一个 .car 文件。使用 binwalk 可知其中包含 bzip2 的压缩数据。

接着尝试使用 binwalk -e 将文件分离出来。分离出来后发现直接得到了 flag。

Trollcat{M0zilla_Archive_maaaarls}

Granny wants you

Help my granny login, while monitoring my network one day I was able to capture the credentials, go through this file to get ther credentials

Flag format : username:password ( no – {} )

Author: dboidembla

这题给的流量包中有 300+ 个 TCP 流,因此题目描述中的 login 和 credentials 很重要。结合题目描述可知要找的是登录凭证。既然是登录那应该是 POST 请求。筛选出 POST 请求后可在其中一个里找到如下信息。

将其中的信息摘取下来。

uname=E0IPJIyDGxq2Mx56oz12LKD%3D&pass=01001001+00110010+01001001+01100110+01001100+00110010+00111001+01100111+01001101+01001001+00111001+00110000+01101111+00110001+00111001+01010001+01001000+00110000+01000001+01101001+01001101+01010100+01001001+01101100+01110000+00110010+01110101+00110001+01001100+01110100+00111101+00111101

其中的 E0IPJIyDGxq2Mx56oz12LKD%3D 经过 URL Decode --> From Base64 --> ROT13 的路径解码后可得到 TROLLCATisAmazingpass 参数的内容将 + 替换为空格后再经过 From Binary --> From Base64(N-ZA-Mn-za-m0-9+/=) 的路径解码后可以得到 Welcome_to_CSCodershub。(需要注意这一步的 base64 解码是换表的解码)根据题目描述将两段字符串用冒号拼接即可得到 flag。

TROLLCATisAmazing:Welcome_to_CSCodershub

Rich Orphan

参考:

https://passlib.readthedocs.io/en/stable/lib/passlib.hash.md5_crypt.html

根据附件给出的 hash 格式可知是 md5_crypt。

sys:$1$fUX6BPOt$Miyc3UpOzQJqz4s5wFD9l0:14742:0:99999:7:::
sys:x:3:3:sys:/dev:/bin/sh

按照参考文档写个脚本使用 GitHub 一万常见密码表爆破。

from passlib.hash import md5_crypt

passwordFile = open("10-million-password-list-top-10000.txt", "r")
passwords = passwordFile.read().split("\n")
HASH = "$1$fUX6BPOt$Miyc3UpOzQJqz4s5wFD9l0"
for password in passwords:
    if md5_crypt.verify(password, HASH):
        print("[*] Found password ${}$".format(password))
        break
    else:
        print("[+] Trying password ${}$".format(password))

运行脚本可以得到密码是 batman

Trollcat{batman}

Mr_evilpepo

volatility2 跑一下 imageinfo 得到 profile。

cmdline 下可以发现一个编辑 mysecret.txt 的指令,于是 filescan 一下将其在内存中的位置找出来。

使用 dumpfiles 将这个文档提取出来,可以得到以下内容。

https://mega.nz/file/m18HSSaJ#_4Gmn4aWnrKN2716fMdSQogECaGsS5kKkDAytocSCZM

将文件下载下来,得到 secret 文件。接着在镜像中找线索,使用 cmdscan 查看 cmd 的执行历史,可以发现一个 flag。

Trolcat{commands_4r3_important}

在 pslist 中还可以发现 Chrome 的进程,于是提取 Chrome 的历史记录。

可以发现使用者访问了 VeraCrypt 的下载页面和一个加密 Pastebin 的网站。同时往上找可以得到使用者粘贴的内容的网址。

https://defuse.ca/b/sOOqp4UunTdD0oUjidJFlzs

使用 hashdump 读取用户账户密码的 hash 2e6a7cf5aabb33a044684dd9c97e88a7。使用在线破解可以得到密码为 abracadabra。

使用这个密码解密加密的 Pastebin 可以得到如下内容。

Trollcat{secret_hidden_0nn_th3_1ntern3t}

使用 VeraCrypt 加载 secret 文件,使用同一个密码挂载磁盘。打开挂载的磁盘可以得到 foryou.txt,其中包含第三个 flag。

Trollcat{y0u_got_n1ce_Skills!!!}

s3cr3t

使用 FTK Imager 挂载 trollcat.E01 文件。

X:\[root]\Favorites\drive 下可以找到 topsecret.zip 文件。其中包含一个需要解锁 bitlocker 的虚拟磁盘文件。写个脚本使用 GitHub 上的一万个常用密码爆破 BitLocker 密码。

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ORMi;

namespace BLCSTest{
    internal class Program{
        private const uint FVE_E_FAILED_AUTHENTICATION = 0x80310027;
        public static void Main(string[] args){
            const int LOCKED = 1;
            const int UNLOCKED = 0;
            const uint FVE_E_FAILED_AUTHENTICATION = 0x80310027;
            WMIHelper helper = new WMIHelper("Root\\CIMV2\\Security\\MicrosoftVolumeEncryption");
            List<EncryptableVolume> volumes = helper.Query<EncryptableVolume>().ToList();
            EncryptableVolume encryptedVolume = null;

            Parallel.ForEach(volumes, (volume) => {
                var lockStatus = volume.GetLockStatus();
                if(lockStatus.Status == LOCKED){
                    encryptedVolume = volume;
                }
            });
            Console.WriteLine("[*] Found Drive {0}",encryptedVolume.PersistentVolumeID);
            List<string> passwords = File.ReadAllLines(@"X:\path\to\10-million-password-list-top-10000.txt",Encoding.Default).ToList();
            bool stopWatchStop = false;
            TimeSpan timeSpan = TimeSpan.Zero;
            Stopwatch stopwatch = new Stopwatch();
            stopwatch.Start();
            Parallel.ForEach(passwords, (password) => {
                encryptedVolume.UnlockWithPassphrase(password);
                if(encryptedVolume.GetLockStatus().Status == UNLOCKED){
                    if(!stopWatchStop){
                        stopWatchStop = true;
                        stopwatch.Stop();
                        timeSpan = stopwatch.Elapsed;
                    }
                    Console.WriteLine("[*] Unlocked in {0}",timeSpan.TotalMilliseconds);
                    Environment.Exit(0);
                }
            });
        }
    }
}

[WMIClass("Win32_EncryptableVolume")]
public class EncryptableVolume : WMIInstance
{
    public string DeviceID {get; set;}
    public string PersistentVolumeID {get; set;}
    public string DriveLetter {get; set;}
    public int ProtectionStatus {get; set;}

    public VolumeVersion GetVersion(){
        return WMIMethod.ExecuteMethod<VolumeVersion>(this);
    }
    public class VolumeVersion{
        public int Version{ get; set; }
        public int ReturnValue { get; set; }
    }
    public LockStatus GetLockStatus(){
        return WMIMethod.ExecuteMethod<LockStatus>(this);
    }
    public class LockStatus{
        [WMIProperty("LockStatus")]
        public int Status{ get; set; }
        public int ReturnValue { get; set; }
    }
    public UnlockStatus UnlockWithPassphrase(string passphrase){
        return WMIMethod.ExecuteMethod<UnlockStatus>(this, new { Passphrase = passphrase });
    }

    public class UnlockStatus{
        public uint ReturnValue { get; set; }
    }
}

挂载磁盘后运行脚本可以得到如下运行结果。

[*] Found Drive {84D081EF-90E6-49AE-9F72-35E226441E8E}
[*] Unlocked in 52768.7111

脚本在 52768.7111ms 后解锁了磁盘。使用 FTK Imager 访问挂载后的磁盘,可以在回收站中找到 flag 文件。

Trollcat{finallly_y0u_f0und_mY_s3ret!!!}

the_sus_agent

Wireshark 分析流量包,在 TCP 流 0 处可以发现 welcome.jpg。在 TCP 流 88 处可以发现名为 secret 的字符串。

将得到的字符串 aWhvcGV5b3VkaWRub3R0cmllZHRvYnJ1dGVmb3JjZWl0 base64 解码一次可得 ihopeyoudidnottriedtobruteforceit。将图片提取出来后上传到 aperisolve 使用这个字符串作为密码分析,可以得到以下结果。

将文件下载下来解压即可得到 flag。

Trollcat{this_challenge_was_easy_right???}

results matching ""

    No results matching ""